@use '@/styles/variables.scss' as *;
@forward 'element-plus/theme-chalk/src/mixins/config.scss' with (
  $namespace: $namespace,
);
@use "element-plus/theme-chalk/src/index.scss" as *;

// cover some element-ui styles
.#{$namespace}-menu-item,
.#{$namespace}-sub-menu__title {
  --el-menu-item-height: 48px;
}

.#{$namespace}-menu-item:hover {
  --el-menu-hover-bg-color: rgb(0, 20, 40);
  color: var(--menu-active-text);
}

.#{$namespace}-menu-item.is-active {
  background-color: var(--el-color-primary);
  color: var(--menu-active-text);
}

.#{$namespace}-menu-item.is-active:hover {
  background-color: var(--el-color-primary);
  color: var(--menu-active-text);
}

.#{$namespace}-breadcrumb__inner,
.#{$namespace}-breadcrumb__inner a {
  font-weight: 400 !important;
}

.#{$namespace}-upload {
  input[type='file'] {
    display: none !important;
  }
}

.#{$namespace}-upload__input {
  display: none;
}

.cell {
  .#{$namespace}-tag {
    margin-right: 0;
  }
}

.small-padding {
  .cell {
    padding-left: 5px;
    padding-right: 5px;
  }
}

.fixed-width {
  .#{$namespace}-button--mini {
    padding: 7px 10px;
    min-width: 60px;
  }
}

.status-col {
  .cell {
    padding: 0 10px;
    text-align: center;

    .#{$namespace}-tag {
      margin-right: 0;
    }
  }
}

// refine element ui upload
.upload-container {
  .#{$namespace}-upload {
    width: 100%;

    .#{$namespace}-upload-dragger {
      width: 100%;
      height: 200px;
    }
  }
}
// dropdown
.#{$namespace}-dropdown-menu {
  &__item {
    &:focus {
      --el-dropdown-menuItem-hover-fill: #f5f7f9;
      --el-dropdown-menuItem-hover-color: --nav-bar-disabled-text;
    }
  }
  //  a {
  //    display: block
  //  }
}

// fix date-picker ui bug in filter-item
.#{$namespace}-range-editor.#{$namespace}-input__inner {
  display: inline-flex !important;
}

// to fix el-date-picker css style
.#{$namespace}-range-separator {
  box-sizing: content-box;
}

/*
 element-ui reset
*/
.#{$namespace}-card {
  &__body {
    padding: 16px !important;
  }
}

.#{$namespace}-popper {
  max-width: 500px;
}

.#{$namespace}-table {
  &__header {
    th {
      color: #333;
      background-color: #f5f7fa !important;
    }
  }
}

.#{$namespace}-table-column--selection {
  .cell {
    text-align: center;
  }
}

.#{$namespace}-form--inline {
  .#{$namespace}-form-item {
    .#{$namespace}-input,
    .#{$namespace}-cascader,
    .#{$namespace}-select,
    .#{$namespace}-autocomplete {
      width: 160px;
    }
  }
}
